<?php
$data = [
		['id'=>101,'name'=>'Peter','age'=>28,'salary'=>3000],
		['id'=>102,'name'=>'Jack','age'=>284,'salary'=>3500],
		['id'=>103,'name'=>'Tom','age'=>22,'salary'=>3900],
		['id'=>104,'name'=>'Bill','age'=>21,'salary'=>6900],
];
?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>test</title>
</head>
<body>
<h3 align="center">用户信息表</h3>
	<table border="1" cellspacing="0" width="50%" align="center">
		<tr>
			<th>id</th>
			<th>name</th>
			<th>age</th>
			<th>salary</th>
		</tr>
		<?php foreach($data as $value):?>
		<tr>
			<td><?php echo $value['id'];?></td>
			<td><?php echo $value['name'];?></td>
			<td><?php echo $value['age'];?></td>
			<td><?php echo $value['salary'];?></td>
		</tr>
	<?php endforeach; ?>
	</table>
</body>
</html>